New Functions in Week 9

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

coord_cartesian

{GGPLOT2}

Zoom into a plot region without removing data (set Cartesian axis limits)

pt

{stats}

Calculate the cumulative distribution function of the t-distribution

rnorm

{base}

Generate random numbers from a normal distribution

prop.test

{stats}

Test of Equal or Given Proportions

tibble

{tibble}

A modern data frame from the tidyverse

complete.cases

{stats}

Find Complete Cases

geom_line

{GGPLOT2}

Generates a line

stat_ecdf

{GGPLOT2}

Compute empirical cumulative distribution

geom_abline

{GGPLOT2}

Add a reference line with a given slope and intercept

qt

{stats}

Quantile function for t-distribution

cat

{base}

Concatenate and print objects to the console without quotes or indices

sprintf

{base}

C-style formatted string printing

exists

{base}

Test whether a named object/variable exists

ceiling

{base}

Round numbers up to the smallest following integer

geom_hline

{GGPLOT2}

Add a horizontal line in GGPLOT2

replicate

{base}

Repeatedly evaluate an expression (wrapper around sapply)

pwr.t.test

{pwr}

Calculate power, sample size, or effect size for t-tests

round

{base}

Rounds numbers

set.seed

{base}

Initialise a pseudorandom number generator.

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

sqrt

{base}

Square-root function

sapply

{base}

Apply a function over a vector or list and simplify the result

expression

{base}

Used in plots to add symbols to axes

power.t.test

{stats}

Power calculations for one- and two-sample t-tests

theme_minimal

{GGPLOT2}

A minimalistic theme with no background annotations

The end!